﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IAdaptService.cs" company="">
//   
// </copyright>
// <summary>
//   The AdaptService interface.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Libium.Adapters
{
    using System;
    using System.Collections.Generic;

    /// <summary>
    ///   The AdaptService interface.
    /// </summary>
    public interface IAdaptService
    {
        #region Public Methods and Operators

        /// <summary>
        /// The can adapt.
        /// </summary>
        /// <param name="type1">
        /// The type 1. 
        /// </param>
        /// <param name="type2">
        /// The type 2. 
        /// </param>
        /// <returns>
        /// The <see cref="bool"/> . 
        /// </returns>
        bool CanAdapt(Type type1, Type type2);

        /// <summary>
        /// The get adapt types.
        /// </summary>
        /// <param name="type">
        /// The type. 
        /// </param>
        /// <returns>
        /// The <see cref="IEnumerable"/> . 
        /// </returns>
        IEnumerable<Type> GetAdaptTypes(Type type);

        /// <summary>
        /// The try adapt.
        /// </summary>
        /// <param name="obj1">
        /// The obj 1. 
        /// </param>
        /// <param name="type">
        /// The type. 
        /// </param>
        /// <param name="obj2">
        /// The obj 2. 
        /// </param>
        /// <returns>
        /// The <see cref="bool"/> . 
        /// </returns>
        bool TryAdapt(object obj1, Type type, out object obj2);

        #endregion
    }
}